package Demo1;

import java.util.Scanner;
import Demo1.UsePasswordException;
public class Login {
    Scanner scanner = new Scanner(System.in);
    String password = scanner.nextLine();

    public void passwordCheck(String passord){
        if (!this.password.equals(passord)){
            throw new UsePasswordException();
        }

        System.out.println("密码正确");
    }

}
